CC = gcc
PP = gcc
AR = ar rcv
ifeq ($(windir),)
EXE =
RM = rm -f
RMDIR = rm -rf
else
EXE = .exe
RM = del
RMDIR = rmdir /Q /S
endif

CFLAGS = -O2 -Os -D BSDIFF_EXECUTABLE -fno-exceptions -fvisibility=hidden -ffunction-sections -fdata-sections -Wextra -fno-exceptions
LDFLAGS = -Wl,--gc-sections,--print-gc-sections
INC = -I.

all:bsdiff.o # Bsdiff$(EXE)

bsdiff.o:bsdiff.c
	$(CROSS_COMPILE)$(PP) -o $@ $(CFLAGS) -c $< $(INC)

#Bsdiff$(EXE):bsdiff.o
#	$(CROSS_COMPILE)$(PP) -o $@ $^ $(LDFLAGS) -s

clean:
	-$(RM) $(all)
